package com.pojo;

public class Product {

	private int id;
	private String name;
	
	// 自动注入对象Category
//	@Autowired
//	@Resource(name = "c")
	private Category category;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public Category getCategory() {
		return category;
	}
	
	// set方式加@Autowired注解效果与在属性上添加一样
	// @Autowired
	public void setCategory(Category category) {
		this.category = category;
	}
	
}
